package pers.cyril.study.graphql.demo.entity;

import java.util.Objects;

/**
 * 说点什么吧
 *
 * @author Wang Cyril
 * @date 2024/7/2 21:49
 */
public class Area {

    private String code;

    private String name;

    private String cityCode;

    private String provinceCode;

    public Area() {
    }

    public Area(String code, String name, String cityCode, String provinceCode) {
        this.code = code;
        this.name = name;
        this.cityCode = cityCode;
        this.provinceCode = provinceCode;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Area area = (Area) o;
        return Objects.equals(code, area.code) && Objects.equals(name, area.name) && Objects.equals(cityCode, area.cityCode) && Objects.equals(provinceCode, area.provinceCode);
    }

    @Override
    public int hashCode() {
        return Objects.hash(code, name, cityCode, provinceCode);
    }
}
